package com.bw.product.controller;

import com.bw.common.core.domain.Result;
import com.bw.product.domain.UserAttrDiscountCoupon;
import com.bw.product.domain.vo.UserAttrDiscountCouponVo;
import com.bw.product.service.UserAttrDiscountCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户优惠券
 */
@RestController
@RequestMapping("/UserAttrCoupon")
public class UserAttrDiscountCouponController {
    @Autowired
    private UserAttrDiscountCouponService userAttrDiscountCouponService;


    /**
     * 用户优惠列表
     * @param state
     * @return
     */
    @GetMapping("/list")
    public Result<List<UserAttrDiscountCouponVo>> list(@RequestParam(value = "state", required = false) Integer state){
        List<UserAttrDiscountCouponVo> list=userAttrDiscountCouponService.list(state);

        return Result.success(list);
    }















}
